import java.awt.*;
import java.util.Random;

public class FoodObj extends GameObj {
    //随机
    Random r = new Random();
    public FoodObj() { //无参构造方法
        super();
    }
    public FoodObj(Image img, int x, int y, GameWin frame) {//有参构造方法
        super(img, x, y, frame);
    }
    //获取食物
    public FoodObj getFood(){
        return new FoodObj(GameUtils.foodImg,r.nextInt(20) * 30,(r.nextInt(19) +
                1) * 30,this.frame);
    }
    @Override
    public void paintSelf(Graphics g) {
        super.paintSelf(g);
    }
}
